% helper to convert date, time format
% hyzhou, 11/06/2017
% Input: filename specified as YYYY-MM-DD_HH-MM-SS, consistent with our
% current convention in saving files
% Output: float for date and time

function out = datefile2num(fn)

C = strsplit(fn,'_');
C = [C{1},' ',strrep(C{2},'-',':')];
out = datenum(C);